from page.course_org_page import CourseOrgPage

class CourseOrgHandle():
    def __init__(self, driver):
        self.co_p = CourseOrgPage(driver)

    """点击按钮"""
    def click_add(self):
        self.co_p.get_add_buttom_element().click()

    def click_save(self):
        self.co_p.get_save_element().click()

    """填写表单"""
    def send_name(self, name):
        self.co_p.get_form_org_name_element().send_keys(name)

    def send_desc(self, desc):
        self.co_p.get_form_org_desc_element().send_keys(desc)

    def send_tag(self, tag):
        self.co_p.get_form_org_tag_elemeent().send_keys(tag)

    def click_category(self):
        self.co_p.get_form_org_catgory1_element().click()
        self.co_p.get_form_catgory2_element().click()

    def send_click_num(self, num):
        self.co_p.get_form_click_num_element().send_keys(num)

    def send_fav_num(self, num):
        self.co_p.get_form_fav_num_element().send_keys(num)

    def send_image(self, file_name):
        self.co_p.get_form_image_element().send_keys(file_name)

    def send_address(self, text):
        self.co_p.get_form_address_element().send_keys(text)

    def click_city(self):
        self.co_p.get_form_city1_element().click()
        self.co_p.get_form_city2_element().click()

    def send_student(self, num):
        self.co_p.get_form_student_element().send_keys(num)

    def send_course(self, num):
        self.co_p.get_form_course_num_element().send_keys(num)
        